package com.app.model.util;

/**
 * Created by Lichaojie on 2017/3/26. It's a beautiful day.
 */
public class HotArticle implements Comparable<HotArticle>{
    private long id;
    private long approvalNum;
    private long commentsNum;
    private long scanNum;
    private long hotValue;

    public long getId() {
        return id;
    }

    public HotArticle setId(long id) {
        this.id = id;
        return this;
    }

    public long getApprovalNum() {
        return approvalNum;
    }

    public HotArticle setApprovalNum(long approvalNum) {
        this.approvalNum = approvalNum;
        return this;
    }

    public long getCommentsNum() {
        return commentsNum;
    }

    public HotArticle setCommentsNum(long commentsNum) {
        this.commentsNum = commentsNum;
        return this;
    }

    public long getScanNum() {
        return scanNum;
    }

    public HotArticle setScanNum(long scanNum) {
        this.scanNum = scanNum;
        return this;
    }

    public long getHotValue() {
        return hotValue;
    }

    public HotArticle setHotValue(long hotValue) {
        this.hotValue = hotValue;
        return this;
    }

    @Override
    public int compareTo(HotArticle hotArticle){
        long hot = hotArticle.getHotValue();
        if(this.hotValue > hot){
            return 1;
        }else if(this.hotValue == hot){
            return 0;
        }else{
            return -1;
        }
    }

}
